/*
 * @Description: 店铺信息
 * @Author: Kerwin
 * @Date: 2025-06-03 11:43:49
 * @LastEditTime: 2025-06-03 14:10:03
 * @LastEditors:  Please set LastEditors
 */

// src/store/modules/shopInfoStore.ts

import { defineStore } from 'pinia'

export const useShopInfoStore = defineStore('shopInfo', {
  state: () => ({
    shopData: {} as any, // 店铺原始数据
    brandId: 1, // 品牌ID
    isApp:false,
    shopInfo: {
      id:'',
      name: '',
      adress: '',
      distance: '',
    },
  }),
  actions: {
    setShopData(data: any) {
      this.shopData = data
    },
    setBrandId(id: number) {
      this.brandId = id
    },
    setShopInfo(info: any) {
      this.shopInfo = info
    },
    setIsApp(flag: boolean) {
      this.isApp = flag
    },
  },
  persist: true,
})
export default useShopInfoStore